package com.xixi.canal.client.starter.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "canal")
public class CanalConfig {

    @Value("${canal.destinations}")
    private String destinations;

    @Value("${canal.conf.dir}")
    private String confDir;

    @Value("${canal.auto.scan}")
    private Boolean autoScan;

    @Value("${canal.auto.interval}")
    private Integer autoInterval;

    @Value("${canal.meta.mode}")
    private String metaMode = "FILE";

    @Value("${canal.file.data.dir}")
    private String fileDataDir;

    @Value("${canal.file.flush.period}")
    private Integer fileFlushPeriod;


    public String getDestinations() {
        return destinations;
    }

    public void setDestinations(String destinations) {
        this.destinations = destinations;
    }

    public String getConfDir() {
        return confDir;
    }

    public void setConfDir(String confDir) {
        this.confDir = confDir;
    }

    public Boolean getAutoScan() {
        return autoScan;
    }

    public void setAutoScan(Boolean autoScan) {
        this.autoScan = autoScan;
    }

    public Integer getAutoInterval() {
        return autoInterval;
    }

    public void setAutoInterval(Integer autoInterval) {
        this.autoInterval = autoInterval;
    }

    public String getFileDataDir() {
        return fileDataDir;
    }

    public void setFileDataDir(String fileDataDir) {
        this.fileDataDir = fileDataDir;
    }

    public Integer getFileFlushPeriod() {
        return fileFlushPeriod;
    }

    public void setFileFlushPeriod(Integer fileFlushPeriod) {
        this.fileFlushPeriod = fileFlushPeriod;
    }

    public String getMetaMode() {
        return metaMode;
    }

    public void setMetaMode(String metaMode) {
        this.metaMode = metaMode;
    }
}
